package com.ziroom.zifamily.zfms.common.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * <p>TODO</p>
 * <p>
 * <PRE>
 * <BR>    修改记录
 * <BR>-----------------------------------------------
 * <BR>    修改日期         修改人          修改内容
 * </PRE>
 *
 * @author cuiyh9
 * @version 1.0
 * @Date Created in 2018年11月20日 10:56
 * @since 1.0
 */
@WebFilter
public class DemoFilter implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        System.out.println("----------init-----------");
    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("----------before doFilter-----------");
        filterChain.doFilter(servletRequest, servletResponse);
        System.out.println("----------after doFilter-----------");
    }

    @Override
    public void destroy() {
        System.out.println("----------destroy-----------");
    }
}
